<?php
class Manager_Vortal
{
	public static function initialize()
	{		
		if (VortalsPeer::doCount(new Criteria()) === 0) {
			try {
				$vortal = new Vortals();
				$vortal->setName(Manager_SiteConfig::SITE_NAME)
					->setUrl(Manager_SiteConfig::SITE_URL)
					->setRequeststatuses(Manager_RequestStatus::getDone())
					->setIsactive(true);	
				$vortal->save();
			} catch (Exception $e) {
				throw new Exception('Vortal could not be initialized in the DB. ' . $e->getMessage());
			}
		}
	}
}